package inter;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

public class Change implements Runnable {

	public static char[] word1 = new char[1];

	public static StringProperty word = new SimpleStringProperty();

	public StringProperty wordProperty() {
		return word;
	}

	public final String getWord() {
		return wordProperty().get();
	}

	public final void setWord(String text) {
		wordProperty().set(text);
	}

	@Override
	public void run() {
		// TODO Auto-generated method stub

		int start = 19968, end = 32320, rand;
		while (true) {
			rand = (int) (start + Math.random() * (end - start + 1));
			try {
				Thread.sleep(3000);
			} catch (InterruptedException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			word1[0] = (char) rand;
			word.setValue(new String(word1));
			System.out.println(word.getValue());

		}
	}

}
